let vm = new Vue({
    el: '.page-content',
    data: {
        Article: {},
    },
    methods: {
        doDelete: function (Article) {

            layer.msg('确认收藏', {
                time: 20000, //20s后自动关闭
                btn: ['是', '否'],

                yes: () => {
                    Article.collection = "0";

                    axios({
                        url: "mapper/article/doUpdate",
                        method: "post",
                        data: Article,

                    }).then(response => {
                        layer.msg("关注成功")
                    }).catch(error => {
                        layer.msg(error.message)
                    });
                }
            });
        },

        CancelTheCollection: function (Article) {
            layer.msg('取消收藏', {
                time: 20000, //20s后自动关闭
                btn: ['是', '否'],

                yes: () => {
                    //删除标记（0：正常；1：删除；2：审核；）
                    Article.collection = "1";

                    axios({
                        url: "mapper/article/doUpdate",
                        method: "post",
                        data: Article,
                    }).then(response => {
                        layer.msg("取消成功")
                    }).catch(error => {
                        layer.msg(error.message)
                    });
                }
            });
        },
    },
    created: function () {
        this.Article = parent.layer.obj;
    }
});